<div id="navbar" class="main-slide col-12 col-lg-2 col-sm-3 col-md-2 px-0">
    <div class="nav-wrapper">
        <ul class="slide-nav">
            {* nav-item-active 是主菜单的高亮 *}
            <li class="nav-item {if $controllerName == 'index'}nav-item-active{/if}">
                <a href="/" class="nav-link border-bottom">
                    <span class="nav-icon glyphicon glyphicon-home" aria-hidden="true"></span>
                    <i>工作主页</i>
                </a>
            </li>
            {if in_array('caseallocate', $roleList) || in_array('mediate', $roleList) || in_array('entryrepay', $roleList) || in_array('mediateaudit', $roleList) || in_array('incoming', $roleList)|| in_array('caseupload', $roleList)|| in_array('repairmobile', $roleList)|| in_array('caseuploadcheck', $roleList)}
            <li class="nav-item slide-dropdown {if in_array($controllerName, ['caseallocate','mediate','entryrepay','mediateaudit','incoming','caseupload','repairmobile','caseuploadcheck'])}nav-item-active{/if}">
                <a href="javascript:;" class="nav-link dropdown-toggle border-bottom">
                    <span class="nav-icon glyphicon glyphicon-briefcase" aria-hidden="true"></span>
                    <i>工作台</i>

                    <div class="nav-arrow-down glyphicon glyphicon-menu-down"></div>
                    <div class="nav-arrow-up glyphicon glyphicon-menu-up"></div>
                </a>
                <div class="slide-dropdown-menu">
                    {* dropdown-item-active 是二级菜单的选中状态 *}
                    {if in_array('caseupload', $roleList)}
                        <a href="/caseupload/index" class="dropdown-item border-bottom {if $controllerName == 'caseupload' && in_array($actionName, ['index'])}dropdown-item-active{/if}">录入案件</a>
                    {/if}
                    {if in_array('caseupload', $roleList)}
                        <a href="/caseupload/list" class="dropdown-item border-bottom {if $controllerName == 'caseupload' && in_array($actionName, ['list','detail'])}dropdown-item-active{/if}">录入记录</a>
                    {/if}
                    {if in_array('caseuploadcheck', $roleList)}
                        <a href="/caseuploadcheck/index" class="dropdown-item border-bottom {if $controllerName == 'caseuploadcheck' && in_array($actionName, ['index'])}dropdown-item-active{/if}">录入案件审核</a>
                    {/if}
                    {if in_array('caseallocate', $roleList)}
                    <a href="/caseallocate/index" class="dropdown-item border-bottom {if $controllerName == 'caseallocate' && in_array($actionName, ['index'])}dropdown-item-active{/if}">案件分配</a>
                    {/if}
                    {if in_array('mediate', $roleList)}
                    <a href="/mediate/index" class="dropdown-item border-bottom {if $controllerName == 'mediate' && in_array($actionName, ['index','detail','addMediateLog'])}dropdown-item-active{/if}">案件调解</a>
                    {/if}
                    {if in_array('repairmobile', $roleList)}
                        <a href="/repairmobile/index" class="dropdown-item border-bottom {if $controllerName == 'repairmobile' && in_array($actionName, ['index'])}dropdown-item-active{/if}">手机号码修复</a>
                    {/if}
                    {if in_array('entryrepay', $roleList)}
                    <a href="/entryrepay/list" class="dropdown-item border-bottom {if $controllerName == 'entryrepay' && in_array($actionName, ['index'])}dropdown-item-active{/if}">录入/确认还款</a>
                    {/if}
                    {if in_array('mediateaudit', $roleList)}
                    <a href="/mediateaudit/index" class="dropdown-item border-bottom {if $controllerName == 'mediateaudit' && in_array($actionName, ['index','reviewinfo'])}dropdown-item-active{/if}">调解情况审核</a>
                    {/if}
                    {if in_array('incoming', $roleList)}
                     <a href="/incoming/index" class="dropdown-item border-bottom {if $controllerName == 'incoming' && in_array($actionName, ['index'])}dropdown-item-active{/if}">呼入调解记录</a>
                    {/if}
                </div>
            </li>
            {/if}

            {if in_array('caserecord', $roleList) || in_array('uaction', $roleList) || in_array('smsnoticerecord', $roleList)  || in_array('smslog', $roleList) || in_array('repayments', $roleList)|| in_array('report', $roleList)}
            <li class="nav-item slide-dropdown {if in_array($controllerName, ['organcase','caserecord','suggestionrecord','smslog','uaction','lossrepair','repayments','report','exportdata'])}nav-item-active{/if}">
                <a href="javascript:;" class="nav-link dropdown-toggle border-bottom">
                    <span class="nav-icon glyphicon glyphicon-folder-open" aria-hidden="true"></span>
                    <i>管理中心</i>
                    <div class="nav-arrow-down glyphicon glyphicon-menu-down"></div>
                    <div class="nav-arrow-up glyphicon glyphicon-menu-up"></div>
                </a>
                
                <div class="slide-dropdown-menu">
                    {if in_array('caserecord', $roleList)}
                    <a href="/caserecord/index" class="dropdown-item border-bottom {if $controllerName == 'caserecord' && in_array($actionName, ['index','caseinfo','caseprogress'])}dropdown-item-active{/if}">案件记录</a>
                    {/if}
                    {if in_array('repayments', $roleList)}
                        <a href="/repayments/index" class="dropdown-item border-bottom {if $controllerName == 'repayments' && in_array($actionName, ['index'])}dropdown-item-active{/if}">回款记录</a>
                    {/if}
                    {if in_array('suggestionrecord', $roleList)}
                    <a href="/suggestionrecord/export" class="dropdown-item border-bottom {if $controllerName == 'suggestionrecord' && in_array($actionName, ['export'])}dropdown-item-active{/if}">投诉建议导出</a>
                    {/if}
                    {if in_array('smslog', $roleList)}
                    <a href="/smslog/index" class="dropdown-item border-bottom {if $controllerName == 'smslog' && in_array($actionName, ['index'])}dropdown-item-active{/if}">短信通知记录</a>
                    {/if}
                    {if in_array('uaction', $roleList)}
                        <a href="/uaction/record_list" class="dropdown-item border-bottom {if $controllerName == 'uaction' && in_array($actionName, ['messagerecord'])}dropdown-item-active{/if}">系统操作记录</a>
                    {/if}
                    {if in_array('lossrepair', $roleList)}
                        <a href="/lossrepair/index" class="dropdown-item border-bottom {if $controllerName == 'lossrepair' && in_array($actionName, ['index'])}dropdown-item-active{/if}">失联修复记录</a>
                    {/if}
                    {if in_array('organcase', $roleList)}
                        <a href="/organcase/index" class="dropdown-item border-bottom {if $controllerName == 'organcase' && in_array($actionName, ['index'])}dropdown-item-active{/if}">推送案件记录</a>
                    {/if}
                    {if in_array('report', $roleList)}
                        <a href="/report/index" class="dropdown-item border-bottom {if $controllerName == 'report' && in_array($actionName, ['index'])}dropdown-item-active{/if}">通话统计报表</a>
                    {/if}
                    {if in_array('exportdata', $roleList)}
                        <a href="/exportdata/index" class="dropdown-item border-bottom {if $controllerName == 'exportdata' && in_array($actionName, ['index'])}dropdown-item-active{/if}">数据导出</a>
                    {/if}
                </div>
            </li>
            {/if}


            {if  in_array('plaintiff', $roleList) || in_array('agent', $roleList) || in_array('casetemplate', $roleList)}
            <li class="nav-item slide-dropdown {if in_array($controllerName, ['plaintiff', 'lawfirm','mediateagency','courts'])}nav-item-active{/if}">
                <a href="javascript:;" class="nav-link dropdown-toggle border-bottom">
                    <span class="nav-icon glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>
                    <i>资料库</i>
                    <div class="nav-arrow-down glyphicon glyphicon-menu-down"></div>
                    <div class="nav-arrow-up glyphicon glyphicon-menu-up"></div>
                </a>
                <div class="slide-dropdown-menu">
                    {if in_array('plaintiff', $roleList)}
                    <a href="/plaintiff/list" class="dropdown-item border-bottom {if $controllerName == 'plaintiff' && in_array($actionName, ['list','add','edit'])}dropdown-item-active{/if}">原告资料库</a>
                    {/if}
                    {if in_array('lawfirm', $roleList)}
                    <a href="/lawfirm/index" class="dropdown-item border-bottom {if $controllerName == 'lawfirm' && in_array($actionName, ['index','add','edit'])}dropdown-item-active{/if}">律所库</a>
                    {/if}
                    {if in_array('mediateagency', $roleList)}
                        <a href="/mediateagency/index" class="dropdown-item border-bottom {if $controllerName == 'mediateagency' && in_array($actionName, ['index','add','edit'])}dropdown-item-active{/if}">调解机构库</a>
                    {/if}
                    {if in_array('courts', $roleList)}
                        <a href="/courts/index" class="dropdown-item border-bottom {if $controllerName == 'courts' && in_array($actionName, ['index','add','edit'])}dropdown-item-active{/if}">法院对接管理</a>
                    {/if}
                    {if in_array('platform', $roleList)}
                        <a href="/platform/index" class="dropdown-item border-bottom {if $controllerName == 'platform' && in_array($actionName, ['index','add','edit'])}dropdown-item-active{/if}">平台管理</a>
                    {/if}
                    {if in_array('assets', $roleList)}
                        <a href="/assets/index" class="dropdown-item border-bottom {if $controllerName == 'assets' && in_array($actionName, ['index','add','edit'])}dropdown-item-active{/if}">资产方管理</a>
                    {/if}
                </div>
            </li>
            {/if}




            {if in_array('user', $roleList) || in_array('role', $roleList)}
            <li class="nav-item {if in_array($controllerName, ['clients','user', 'role'])}nav-item-active{/if} slide-dropdown">
                <a href="javascript:;" class="nav-link dropdown-toggle border-bottom">
                    <span class="nav-icon glyphicon glyphicon-th-large" aria-hidden="true"></span>
                    <i>系统管理</i>
                    <div class="nav-arrow-down glyphicon glyphicon-menu-down"></div>
                    <div class="nav-arrow-up glyphicon glyphicon-menu-up"></div>
                </a>
                <div class="slide-dropdown-menu">
                    {if in_array('clients', $roleList)}
                        <a href="/clients/index" class="dropdown-item border-bottom {if $controllerName == 'clients' && in_array($actionName, ['index'])}dropdown-item-active{/if}">坐席管理</a>
                    {/if}
                    {if in_array('user', $roleList)}
                    <a href="/user/index" class="dropdown-item border-bottom {if $controllerName == 'user' && in_array($actionName, ['index','add','edit'])}dropdown-item-active{/if}">用户权限</a>
                    {/if}
                    {if in_array('role', $roleList)}
                    <a href="/role/index" class="dropdown-item {if $controllerName == 'role' && in_array($actionName, ['index','add','edit'])}dropdown-item-active{/if}">权限管理</a>
                    {/if}
                </div>
            </li>
            {/if}
        </ul>
    </div>
</div>